import "../utils/URLInterceptor.js"
//获取话题
export const gettopicAll =  () => {
	return uni.request({
		url:"/user/topic",
		method: "GET",
	})	
}
//添加文章内容
export const upload =  (tempFilePaths) => {
	return uni.uploadFile({
		url: 'http://localhost:8085/user/upload/files',
		filePath: tempFilePaths,
		name: 'file'
	});
}
//添加文章
export const addPosts =  (params) => {
	return uni.request({
		url:"/user/posts/addposts",
		method: "POST",
		data: {
			...params
		},
	})
}
// 获取文章列表
export const postsResult =  () => {
	return uni.request({
		url:"/user/posts",
		method: "get",
	})
}